<?php
/* @var $this ArticleController */
/* @var $model Article */
/* @var $form CActiveForm */

?>
<?php $form=$this->beginWidget('CActiveForm', 
      array("id"=>'articleform',
      'enableClientValidation'=>true,
      'clientOptions'=>array(
        'validateOnSubmit'=>true,
      ),
      "htmlOptions"=>array(
          "class"=>"form-horizontal")
    )); ?>

	 <?php echo $form->errorSummary($model,null,null,array("class"=>'alert alert-error')); ?>

	
	<div class="control-group">
		<?php echo $form->labelEx($model,'title',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>150,"class"=>'span7')); ?>
		</div>
		<?php  $form->error($model,'title'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'parentid',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->dropDownList($model,'parentid',$navdata) ?>
		</div>
		<?php  $form->error($model,'parentid'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'summary',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textArea($model,'summary',array('maxlength'=>300,'rows'=>7,"class"=>'span7')); ?>
		</div>
		<?php  $form->error($model,'summary'); ?>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'content',array('class'=>'control-label')); ?>
		<div class="controls">
				<script id="content" name="Article[content]" type="text/plan">
					<?php echo $model->content ?>
				</script>
			<?php $this->widget('ext.ueditor.UeditorWidget',array(
				'id'=>'content',
				'options'=>array(
					'initialFrameWidth'=>'60%',
					'initialFrameHeight'=>500
			))) ?>
		</div>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'tag',array('class'=>'control-label')); ?>
		<div class="controls">
		<?php echo $form->textField($model,'tag',array('size'=>60,'maxlength'=>150,'class'=>'span5','placeholder'=>'多个标签词用“,”号隔开')); ?>
		<?php  $form->error($model,'tag'); ?>
		</div>
	</div>

	<div class="control-group">
		<?php echo $form->labelEx($model,'status',array('class'=>'control-label')); ?>
		<div class="controls">
			<?php echo $form->dropDownList($model,'status',$status) ?>
		<?php  $form->error($model,'tag'); ?>
		</div>
	</div>
		
	<div class="control-group">
        <div class="controls">
				<?php echo CHtml::submitButton($model->isNewRecord ? '添加' : '修改',array("class"=>'btn')); ?>
				<?php echo CHtml::Button('返回',array('onclick'=>"location.href='".$this->createUrl("index")."'",'class'=>'btn')); ?>
		</div>
	</div>

	<?php $this->endWidget(); ?>
